package com.googlecode.maurersmarbles;

import android.graphics.Paint;

import com.googlecode.maurersmarbles.framework.Game;
import com.googlecode.maurersmarbles.framework.Input.TouchEvent;
import com.googlecode.maurersmarbles.framework.Screen;

public class GameScreen extends Screen {

	protected GameState gameState = new GameState();
	protected Table table = new SimpleTable();
	
	public GameScreen(Game game) {
		super(game);
	}
	
	int x, y;

	@Override
	public void update(float deltaTime) {

		for(TouchEvent touchEvent : game.getInput().getTouchEvents()) {
			x = touchEvent.x;
			y = touchEvent.y;
		}
		
		// TODO Auto-generated method stub
		
	}
	
	@Override
	public void paint(float deltaTime) {
		
		/*gameState.getMarbles()[0][0]++;
		if(gameState.getMarbles()[0][0] >= GameLogic.BOARD_SPACES) {
			gameState.getMarbles()[0][0] = 0;
		}
		*/
		table.draw(game.getGraphics(), gameState);
		
		game.getGraphics().drawString(x + ", " + y, 800, 100, new Paint());
		
	}	
	
	@Override
	public void pause() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void resume() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void dispose() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void backButton() {
		// TODO Auto-generated method stub
		
	}
	
}
